<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Notifications\Notifiable;
use Watson\Validating\ValidatingTrait;

class Course extends Model
{
    //
    use  Notifiable;
    use ValidatingTrait;
    use SoftDeletes;
    protected $table = 'courses';
    //
    protected $fillable = [
       'id', 'c_name', 'c_number','serial_number'
    ];
    public function Semesters()
    {
        return $this->hasOne('App\Models\Semester','id','semester_id');
    }
    protected $rules = [
        'c_name' => 'required|max:50',
    ];
}
